package org.geometerplus.android.fbreader.util;

import java.util.Collection;

/**
 * Created by jackdeng on 2019/10/22.
 */
public class CollectionUtils {
    public static boolean isNotEmpty(Collection collection) {
        return collection != null && !collection.isEmpty();
    }

    public static boolean isNullOrEmpty(Collection collection) {
        return collection == null || collection.isEmpty();
    }

    public static int getSize(Collection collection) {
        return isNotEmpty(collection) ? collection.size() : 0;
    }
}
